<template>
  <div id="menue">
    <el-button type="primary" @click="addsome">添加</el-button>
      <v-list @edit="edit"></v-list>
      <v-add :obj="obj" ref="aa"></v-add>
  </div>
</template> 
<script>
import vList from "./components/list.vue"
import vAdd from "./components/add.vue"
export default {
  data(){
    return{
      obj:{
        istrue:false,
        isadd:true
      }
    }
  },
  methods: {
    addsome(){
      this.obj.istrue=true
    },
    edit(id){
        this.obj.istrue=true,
        this.obj.isadd=false
        this.$refs.aa.getone(id)
    }
  },
  components: {
    vList,
    vAdd,
  },
};
</script>
<style>
</style>